export const showKeyName = function(e) {
  var keyCodeMap = {
    9: 'Tab',
    27: 'Esc',
    35: 'End',
    37: 'Left',
    38: 'Up',
    39: 'Right',
    40: 'Down',
    48: '0',
    49: '1',
    50: '2',
    51: '3',
    52: '4',
    53: '5',
    54: '6',
    55: '7',
    56: '8',
    57: '9',
    65: 'A',
    66: 'B',
    67: 'C',
    68: 'D',
    69: 'E',
    70: 'F',
    71: 'G',
    72: 'H',
    73: 'I',
    74: 'J',
    75: 'K',
    76: 'L',
    77: 'M',
    78: 'N',
    79: 'O',
    80: 'P',
    81: 'Q',
    82: 'R',
    83: 'S',
    84: 'T',
    85: 'U',
    86: 'V',
    87: 'W',
    88: 'X',
    89: 'Y',
    90: 'Z',
    96: '0',
    97: '1',
    98: '2',
    99: '3',
    100: '4',
    101: '5',
    102: '6',
    103: '7',
    104: '8',
    105: '9',
    108: 'Enter',
    112: 'F1',
    113: 'F2',
    114: 'F3',
    115: 'F4',
    116: 'F5',
    117: 'F6',
    118: 'F7',
    119: 'F8',
    120: 'F9',
    121: 'F10',
    122: 'F11',
    123: 'F12',
    191: '/'
  }
  if (keyCodeMap[e.keyCode]) {
    return keyCodeMap[e.keyCode]
  } else {
    if (e.keyCode === 16) return 'Shift'
    if (e.keyCode === 17) return 'Ctrl'
    if (e.keyCode === 18) return 'Alt'
  }
  return '无'
}
export const quickArr = [
  {
    title: 'Ctrl + F',
    name: '搜索'
  },
  {
    title: 'Ctrl + S',
    name: '保存'
  },
  {
    title: 'Alt + 2',
    name: '校验'
  },
  {
    title: 'Alt + 3',
    name: '美化'
  },
  {
    title: 'F2',
    name: '全屏'
  },
  {
    title: 'Esc',
    name: '关闭全屏 '
  },
  {
    title: 'F1',
    name: '更多快捷键'
  },
  {
    title: 'Ctrl + F',
    name: '搜索'
  },
  {
    title: 'Ctrl + H',
    name: '替换'
  },
  {
    title: 'Ctrl + Z',
    name: '撤销'
  },
  {
    title: 'Ctrl + Y',
    name: '重做'
  },
  {
    title: 'Ctrl + /',
    name: '注释'
  },
  {
    title: '选中 + Tab',
    name: '缩进'
  },
  {
    title: '选中 + Shift + Tab',
    name: '取消缩进'
  },
  {
    title: 'Shift + Alt + Right',
    name: '选中后续'
  },
  {
    title: 'Shift + Alt + F',
    name: '格式化'
  },
  {
    title: 'Ctrl + Shift + Up/Down',
    name: '编辑多行'
  },
  {
    title: 'Shift + Alt + Up/Down',
    name: '复制一行'
  },
  {
    title: 'Ctrl + Shift + K',
    name: '删除一行'
  },
  {
    title: 'Ctrl + F3',
    name: '匹配下一个'
  },
  {
    title: 'Ctrl + Shift + F3',
    name: '匹配上一个'
  },
  {
    title: 'F7',
    name: '前往下一个高亮'
  },
  {
    title: 'Shift +F7',
    name: '前往上一个高亮'
  },
  {
    title: 'Ctrl + Shift + End',
    name: '前面追加换行'
  },
  {
    title: 'Ctrl + End',
    name: '追加换行'
  },
  {
    title: 'Alt + Up/Down',
    name: '上下换位'
  },
  {
    title: 'Ctrl + Shift + [/]',
    name: '折叠/展开'
  }
]
